const install = (Vue, vm) => {
	//登录
	let login = (params = {}) => vm.$u.get('/user/oauth/token', params);
	
	/* 百货服饰 start */
	//APP百货服饰页面-获取百货服饰下的一级类目ID
	let department = (params = {}) => vm.$u.get('/mall-product/open/product/department', params);
	//搜索查询商品列表 1.点击二级类目搜索
	let queryMall = (params = {}) => vm.$u.get('/mall-product/app/product/query/category', params);
	/* 百货服饰 end*/
	
	
	/* 线上商品  start*/
	//app端商品类目
	let categories = (params = {}) => vm.$u.get('/mall-product/open/product/categories', params);
	//根据类目返回品牌
	let brand = (params = {}) => vm.$u.get('/mall-product/open/product/category/brand', params);
	//搜索查询商品列表-1.商场页面头部搜索 2.点击品牌搜索
	let productQuery = (params = {}) => vm.$u.get('/mall-product/open/product/query', params);
	//获取商品热搜列表
	let hotSearch = (params = {}) => vm.$u.get('/mall-product/open/product/hotSearch', params);
	//获取单个商品信息详情
	let detail = (params = {}) => vm.$u.get('/mall-product/open/product/detail/share', params);
	//APP商品详情页面-获取单个商品信息详情
	let productDedail = (params = {}) => vm.$u.get('/mall-product/app/product/detail', params);
	//APP商品详情页面进行规格的选择-选择规格确定唯一的sku
	let selectSKU = (params = {}) => vm.$u.post('/mall-product/app/product/selectSKU', params);
	/* 线上商品  end*/
	
	
	
	
	/* 运费计算 start */
	//APP确认订单页面-计算商品运费
	let freight = (params = {}) => vm.$u.get('/mall-product/app/product/freight', params);
	//预创建订单
	let preCreated = (params = {}) => vm.$u.post('/mall-order/app/order/pre-created', params);
	//用于商品立即购买生成订单
	let buyNow = (params = {}) => vm.$u.post('/mall-order/app/order/buy_now', params);
	/* 运费计算 end */
	
	/* 优惠劵 start */
	//获取我的优惠劵列表
	let couponList = (params = {}) => vm.$u.get('/user/app/task/couponList', params);
	/* 优惠劵 end*/
	
	/* 收货地址 start */
	//获取默认收货地址
	let receiveSddressDefault = (params = {}) => vm.$u.get('/user/app/receive_address/default', params);
	//根据用户id获取当前用户下所有收货地址
	let receiveAddress = (params = {}) => vm.$u.get('/user/app/receive_address', params);
	//增加一个收货地址信息
	let addAddress = (params = {}) => vm.$u.post('/user/app/receive_address', params);
	//	根据收货地址id修改收货地址详情
	let updateAddress = (params = {}) => vm.$u.put('/user/app/receive_address', params);
	//设置默认收货地址
	let defaultAddress = (params = {}) => vm.$u.put('/user/app/receive_address/default?data_id='+params.data_id);
	//根据收货地址id删除此记录
	let delAddress = (params = {}) => vm.$u.delete(`/user/app/receive_address/${params.id}`);
	/* 收货地址 end */
	
	
	/* 电影相关 start */
	//用户查询电影轮播图列表
	let filmCarousel = (params = {}) => vm.$u.get('/mall-core/app/film-carousel', params);
	//获取影片列表
	let getFilmList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/getFilmLists', params);
	//获取影院列表
	let getCinemaList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/getCinemaLists', params);
	//获取城市列表
	let getCityList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/cityList', params);
	//获取区域
	let getRegionList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/regionList', params);
	//用户查询电影订单列表
	let filmOrder= (params = {}) => vm.$u.get('/mall-order/app/film/order/query/filmOrder', params);
	// 影院排期 影片信息
	let getCinemaFilmList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/getCinemaFilmList', params);
	//影院排期 排期列表
	let moviePlanList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/getMoviePlanList', params);
	//获取影片详情
	let getFilmInfo= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/getFilmInfo', params);
	// 获取区域
	let regionList= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/regionList', params);
	// 获取座位
	let movieSeat= (params = {}) => vm.$u.get('/mall-product/app/cinemaTicket/getMovieSeat', params);
	/* 电影相关 end */
	// 用户订单列表
	let getFoodOrderList= (params = {}) => vm.$u.get('/mall-order/app/order/food/orderList', params);
	// 订单详情
	let getFoodOrderDetail= (params = {}) => vm.$u.get('/mall-order/app/order/food/orderDetails', params);
	//获取行业列表
	let getIndustry= (params = {}) => vm.$u.get('/merchant-underline/open/industry', params);
	// 获取商家列表(线下)
	let getUnderlineMerchant= (params = {}) => vm.$u.get('/merchant-underline/open', params);
	// 线下商品列表（开放接口）
	let openOfflineFoodList= (params = {}) => vm.$u.get('/mall-product/open/offline/food/list', params);
	// APP-商品列表 (需要token接口)
	let offlineFoodList= (params = {}) => vm.$u.get('/mall-product/app/offline/food/list', params);
	// 获取商圈明细
	let merchantFocusDetail= (params = {}) => vm.$u.get('/mall-merchant/app/merchantFocus/detail', params);
	// 关注商圈
	let postMerchantFocus= (params = {}) => vm.$u.post('/mall-merchant/app/merchantFocus', params);
	// 取消关注商圈
	let putMerchantFocus= (params = {}) => vm.$u.put('/mall-merchant/app/merchantFocus', params);
	// 活动列表
	let activityList= (params = {}) => vm.$u.get('/mall-merchant/app/merchant/activity/details/list', params);
	// 活动详情
	let activityDetails= (params = {}) => vm.$u.get('/mall-merchant/app/merchant/activity/details', params);
	
	// APP农副产品页面-获取农产品列表 1.功能点农产品调用
	let productsFarm= (params = {}) => vm.$u.get('/mall-product/open/product/products/farm', params);
	/* 酒店模块*/
	
	// 酒店搜索
	let hotelList= (params = {}) => vm.$u.get('/life-server/app/hotel', params);
	// 酒店详情
	let hotelDetail= (params = {}) => vm.$u.get('/life-server/app/hotel/detail', params);
	// 房型及报价查询
	let hotelRatePlan= (params = {}) => vm.$u.get('/life-server/app/hotel/ratePlan', params);
	
	let smsSend= (params = {}) => vm.$u.post('user/app/sms/send', params);
	let register= (params = {}) => vm.$u.put('user/app/register', params);
	//微信H5跳转app
	let wxConfig= (params = {}) => vm.$u.get('user/open/wx/signature', params);
	//获取支付配置
	let payChannel= (params = {}) => vm.$u.get('mall-order/app/config/payChannel', params);
	/* */
	vm.$u.api = {
		login,
		smsSend,
		register,
		wxConfig,
		department,
		queryMall,
		
		
		categories,
		brand,
		productQuery,	
		hotSearch,
		detail,
		productDedail,
		selectSKU,
		freight,
		preCreated,
		buyNow,
		couponList,
		
		receiveSddressDefault,
		receiveAddress,
		addAddress,
		updateAddress,
		defaultAddress,
		delAddress,
		
		filmCarousel,
		getFilmList,
		getCinemaList,
		getCityList,
		getRegionList,
		filmOrder,
		getCinemaFilmList,
		moviePlanList,
		getFilmInfo,
		regionList,
		movieSeat,
		getFoodOrderList,
		getFoodOrderDetail,
		getIndustry,
		getUnderlineMerchant,
		openOfflineFoodList,
		offlineFoodList,
		merchantFocusDetail,
		postMerchantFocus,
		putMerchantFocus,
		activityList,
		activityDetails,
		productsFarm,
		hotelList,
		hotelDetail,
		hotelRatePlan,
		payChannel
	}
}
export default {
	install
}
